package com.springcloudalibaba.apiAsyn.configurer;

import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @描述: TODO WebMvc配置
 * @作者: lixing lixing_java@163.com
 * @日期 2020/2/19 22:23
 */
@Component
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    /**
     * @描述 拦截器
     * @作者 lixing
     * @日期 2020/2/19 22:27
     * @Param [registry]
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 系统模块拦截器
        //registry.addInterceptor(new SysIntercept()).addPathPatterns("/**").excludePathPatterns("/","/sys/admin/login","/static/**","/index.html");
        // 接口防刷拦截器
        // registry.addInterceptor(new AccessLimitIntercept(redisTemplate)).addPathPatterns("/**").excludePathPatterns("/","/sys/admin/login","/static/**","/index.html");
        // 微信活动.用户进入首页静默授权拦截器
        //registry.addInterceptor(new AuthIntercept(wxProperties)).addPathPatterns("/wx/hkSeckill/index/**");
        // 微信活动.号卡秒杀拦截器
        //registry.addInterceptor(new DrawLimitIntercept(redisTemplate)).addPathPatterns("/wx/hkSeckill/seckill/**");
    }

}
